<include file="__THEME__/header" />
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js" ></script>
<link href="../Public/css/space.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
var URL = '__URL__';
var uid = '{$uid}'
var FollowedCount = {$FollowedCount};
$(function(){
	$.post('{:U("space/View/isFollow","uid='+uid+'")}',{a:0},function(txt){
		if(txt==1) {
			$('#addFollow').css('display','none');
			$('#delFollow').css('display','');
		}else if(txt==0){
			$('#addFollow').css('display','');
			$('#delFollow').css('display','none');
		}else{
			$('#doInfo').html('');
		}
	});		   
})

function addFollowUser(){
	$.post('{:U("space/View/addFollowUser","uid='+uid+'")}',{a:0},function(txt){
		if(txt==0) {
			$.tbox.no('{:L(index_0000)}');
		}else{
			$('#addFollow').css('display','none');
			$('#delFollow').css('display','');
			
			FollowedCount += 1;
			$('#FollowedCount').html(FollowedCount);			
		}
	});
	
	setTimeout('$.tbox.close()',1500);
}

function delFollowUser(){
	$.post('{:U("space/View/delFollowUser","uid='+uid+'")}',{a:0},function(txt){
		if(txt==1) {
			$('#addFollow').css('display','');
			$('#delFollow').css('display','none');

			FollowedCount -= 1;
			$('#FollowedCount').html(FollowedCount);			
		}else{
			$.tbox.no('{:L(index_0001)}');
		}
	});	
	
	setTimeout('$.tbox.close()',1500);	
}

//添加留言
function doaddwall(obj){
	if ($.trim($('#content').val())) {
		$(obj).val('{:L(index_0003)}..');
		var options = {
			success: function(result){
				result = eval("(" + result + ")");
				var q = (result.stealth) ? '<font color="red">【{:L(index_0004)}】</font>' : '';
				
				var html = '<li id="wall_'+result.id+'" class="Fli"><div>'
				         + '<div class="headpic50 L"><a href="'+result.link+'">'
						 + '<img src="' +	result.userface + '" width="50px"/></a></div>'
						 + '<div class="LC"><p class="bg01 pl5"><span class="R pr10"> <php>if($uid==$mid){</php><a href="javascript:void(0)" onclick="dodelwall('+result.id+')">{:L(index_0005)}</a> <php>}</php> </span>'
						 + '<a href="'+result.link+'">'+result.username+'</a> {:L(index_0006)} '+ q +'</p>'
						 + '<p class="pl10 lh30">' + result.content + '</p></div><div class="C"></div></li>';

				$("#wall_list").prepend(html);
				$(obj).val('{:L(index_0007)}');
				$("#content").val('');
			}
		}
		$('#dowall').ajaxSubmit(options);
	}else{
		$.tbox.no('{:L(index_0008)}','{:L(index_0009)}');
	}
}

//回复留言
function doreplaywall(fid){
	var content = $.trim($("#replay_content_"+fid).val());
	if(content){
		$.post('{:U("space/Wall/dowall")}',{touid:uid,fid:fid,content:content},function(result){
			result = eval("("+result+")");
			var html = '<div class="appra"><div class="headpic50 L">'
					 + '<a href="'+result.link+'"><img src="'+result.userface+'" /></a></div>'
	        		 + '<div class="LC2">'
	       			 + '<p class="bg01 pl5"><a href="'+result.link+'">'+result.username+'</a> {:L(index_0006)}</p>'
	        		 + '<p class="pl10 lh30">'+result.content+'</p>'
	      			 + '</div><div class="C"></div></div>';
			$("#replay_content_"+fid).val('');
			$("#doreplay_"+fid).hide();
	        $("#doreplay_"+fid).before(html);
		});
	}else{
		$.tbox.no('{:L(index_0012)}','{:L(index_0013)}');
	}
}

//删除留言
function dodelwall(id){
	if(confirm('{:L(index_0015)}')){
		$.post("{:U('space/Wall/dodel')}",{id:id},function(result){
			$("#wall_"+id).remove();
		});
	}
}
</script>
<php>$usex = ($userInfo['sex']=='MM')?'{:L(index_0017)}':'{:L(index_0018)}';</php>
<div class="contents lbg bg02">
  <!-- --左边信息 begin-------->
	<include file="../Public/left" />
  <!-- --左边信息 end-------->
  <!-- --中间信息 begin-------->
  <div class="contents_min lineR">
    <div class="write_info">
      <h3 class="lh18">
        <span class="R f12 fn cl03">
        {:L(index_0022)}：
        <span class="cl04">
        {:getUserTitle($uid,$spaceInfo['credit_exp'])}
        </span>
		&nbsp;&nbsp;
        {:L(index_0023)}：
        <span class="cl04">
        {$spaceInfo.credit_exp}
        </span>
&nbsp;&nbsp;  	
        {:L(index_0024)}： <span class="cl04">{$spaceInfo['credit_score']}   </span>
		&nbsp;&nbsp;

        </span>
        <a href="#">{:getUserName($uid)}</a>
        <span class="f11 fn alP cl04">
        {$space['baseinfo']['usersex']['value']}
        </span>

         <span class="web_address">{:U('space/View/index',array('uid'=>$spaceInfo['cardId']))}</span>
      </h3>

	      <h4 class="cl03 mb10 fn f14">
		  	<php>if($space['record']){</php> {$space['record']['content']} <php>}else{</php>{:L(index_0025)}..<php>}</php>
	        <span class="cl06 f12 fn" >
	        <php>if($space['record']){</php>{$space['record']['cTime']|friendlyDate}<php>}</php>
	        </span>
	      </h4>

	  <php>if($uid!=$mid){</php>
      <div class="cat1">
        <div class="bl" id="doInfo">
          <span class="news_b mr10">
          <a href="{:U('home/Message/index','type=send')}&touid={$uid}" target="_blank"> {:L(index_0026)} </a>
          </span>
          <span class="news_b">
          <a href="#dowall">{:L(index_0028, array('usex'=>$usex))} </a>
          </span>
        </div>
        <div>
        <input class="btn_b_04 mr10" id="addFollow" type="button" value="{:L(index_0029)}" onclick="addFollowUser()" style="display:none; margin-top:5px; *+margin-top:0; _margin-top:5px; " />
        <span class="bor_box f12" id="delFollow" style="display:none;">
                      {:L(index_0030)}， <a href="#" onclick="$.tbox.confirm('{:L(index_0031)}！','{:L(index_0032)}',{ok:'delFollowUser'})"> {:L(index_0033)} </a>
        </span>
        </div>
      </div>
	  <php>}</php>
      <div class="dynamic mt10">
        <div class="basic_infor">
        <!--
        <ul class="organise">
        	<li><a href="#">CEO</a></li>
        	<li class="underling"><a href="#">boss</a></li>
        	<li class="underling2"><a href="javascript:;">{$space['baseinfo']['username']['value']}</a></li>
        </ul>
		-->
          <h1 class="bg01 pl10 f12" >{:L(index_0034)}</h1>
          <volist id="vo" name="space[baseinfo]">
          <p>{$vo.info}：{$vo.value}</p>
		  </volist>
		  <php>if($space['extend']['experience']){</php>
	          <h1 class="bg01 pl10 f12" >{:L(index_0035)}</h1>
	          <p>{$space['extend']['experience']['value']}</p>
		  <php>}</php>
		
         <p class="alR" style="margin-right:5px"><a href="{:U('space/View/profile','uid='.$uid)}">{:L(index_0036)}</a></p>
        </div>
        <div>
        <p class="bg01 pl10 fB lh25" >{:L(index_0037, array('usex'=>$usex))}</p>
        <div class="list_conter">
          <ul class="FList">
<volist id="vo" name="space['feeds']['data']">
            <li class="Fli">
              <div class="headpic50 L"><a href="#"><img src="{$vo.uid|getUserFace='s'}" width="50"/></a></div>
              <div class="LC">
                <div>
                  <span class="R cl06">
                  <em>{$vo.cTime|friendLydate}</em>
                  </span>
                  {$vo.title}</div>
                <div class="pl10">{$vo.body}</div>
				<php>if($vo['comment']){</php>
               		<div class="rc">{$vo.comment}</div>
				<php>}</php>
              </div>
              <div class="C"></div>
            </li>
</volist>   
          </ul>
          <div class="R lh30 mb20"><a href="{:U('space/View/feed',array('uid'=>$uid,'p'=>2))}">{:L(index_0038)}... </a></div>
        </div>
         <div class="C"></div>
        </div>
       
        <form action="{:U('space/Wall/dowall')}" method="post" id="dowall">
        <input type="hidden" name="touid" value="{$uid}" />
        <div class="pb10">
         <p class="bg01 pl10 fB lh25" >{:L(index_0028, array('usex'=>$usex))}</p>
          <div><textarea name="content" id="content" style="width:99.7%;height:120px;border:1px solid #CCCCCC;" cols="" rows=""></textarea></div>
          <p class="pt5 lh16">
          	<span class="R cl03"><input class="btn_sea"  onclick="doaddwall(this)" type="button"  value="{:L(index_0041)}"/></span>
            <span class="cl03"><input  name="stealth" type="checkbox" value="1" style="margin-right:5px;*margin-right:0;"/>{:L(index_0004)}</span>
          </p>
          <p class="C"></p>
         </div>
         </form>
        <div class="pt10">
        <p class="bg01 pl10 fB lh25" >{:L(index_0043)}</p>
        <div class="list_conter">
          <ul id="wall_list" class="book">
			<volist id="vo" name="space['walls']">
				<php>if($vo['stealth']==1 && ($vo['uid']!=$mid && $vo['fromuid']!=$mid)){</php>	
				<php>}else{</php>
			            <li id="wall_{$vo.id}" class="Fli">
			            <div>
			              <div class="headpic50 L"><a href="{:U('space/View','uid='.$vo['fromuid'])}"><img src="{$vo.fromuid|getUserFace='s'}" width="50px"/></a></div>
			              <div class="LC"><p class="bg01 pl5"><span class="R pr10"> <php>if($vo['uid']==$mid){</php><a href="javascript:void(0)" onclick='$("#doreplay_{$vo.id}").show()'>{:L(index_0044)}</a> <a href="javascript:void(0)" onclick="dodelwall({$vo.id})">{:L(index_0005)}</a> <php>}</php></span>
			                  <a href="{:U('space/View','uid='.$vo['fromuid'])}">{$vo.fromuid|getUserName}</a> {$vo.cTime|friendlyDate} <eq name="vo['stealth']" value="1"><font color="red">【{:L(index_0004)}】</font></eq></p>
			                <p class="pl5 pt5 lh20">
			                		{$vo.content}
			                </p>
			              </div>
			              <div id="replaylist_{$vo.id}">
			   			  <volist id="svo" name="vo['reply']">
			              <div class="appra">
			                <div class="headpic50 L"><a href="{:U('space/View','uid='.$svo['fromuid'])}"><img src="{$svo.fromuid|getUserFace='s'}" width="50px"/></a></div>
			                <div class="LC1">
			                  <p class="bg01"><a href="{:U('space/View','uid='.$svo['fromuid'])}">{$svo.fromuid|getUserName}</a> {$svo.cTime|friendlyDate}</p>
			                  <p class="pl5 pt5 lh20">{$svo.content}</p>
			                </div>
			                </div>
						  </volist>
			              <div id="doreplay_{$vo.id}" style="display:none" class="appra">
			                <div class="headpic50 L"><img src="{$mid|getUserFace='s'}" width="50px"/></div>
			                <div class="LC1" >
			                  <textarea name="replay_content_{$vo.id}" id="replay_content_{$vo.id}" class="w430_tx line"></textarea><br />
			                  <input class="btn_r" name="" onclick="doreplaywall({$vo.id})" type="button" value="{:L(index_0044)}" /> <input class="btn_r" name="" onclick='$("#doreplay_{$vo.id}").hide()' type="button" value="{:L(index_0033)}" />
			                </div>
			               </div>
			             </div>
			              </div>
			              <div class="C"></div>
			            </li>
					<php>}</php>
			</volist>
          </ul>
           <p class="C"></p>
          <p class="R lh30 mb20"><a href="{:U('space/View/wall',array('uid'=>$uid))}">{:L(index_0038)}... </a></p>
        </div>
        </div>
      </div>
    </div>
  </div>
  <!-- --中间信息 begin-------->
  <!-- --右边信息 begin-------->
  <div class="contents_right">
    <div class="ballot">
      <span class="comment"><a href="{:U('space/View/followme',"uid=".$uid)}">
      <p class="pt5" id="FollowedCount">{$FollowedCount}</p></a>
      <p class="pt5">{:L(index_0057, array('usex'=>$usex))}</p>
      </span>
      <span class="comment Le"><a href="{:U('space/View/followyou',"uid=".$uid)}">
      <p class="pt5" id="FollowCount">{$FollowCount}</p></a>
      <p class="pt5">{:L(index_0056, array('usex'=>$usex))}</p>
      </span>
    </div>
    <div class="C"></div>
    <div class="atten_deta f12">
      <p class="f14 fB pb10 pl5">{:L(index_0057, array('usex'=>$usex))}</p>
      <ul>
      <php>if($space['followMe']){</php>
	      <volist id="vo" name="space['followMe']">
	        <li><span class="headpic50h"><a class="pic_box" href="{:U('space/View','uid='.$vo)}" target="_blank"><img src="{$vo|getUserFace='s'}" width="50" /></a></span>
	          <span class="OverHW lh18">
	          <a href="{:U('space/view','uid='.$vo)}" rel="{$vo}" class="preview" target="_blank">{$vo|getUsername}</a>
	          </span>
	        </li>
	      </volist>
	  <php>}else{</php>
	  		{:L(index_0059, array('usex'=>$usex))}
	  <php>}</php>
      </ul>
       <p class="C"></p>
      <p class="f12 pt10 pr5 alR"><a href="{:U('space/View/followme',"uid=".$uid)}" target="_blank">{:L(index_0061)}...</a></p>
    </div>
    <div class="C"></div>
    
    <div class="atten_deta f12">
      <p class="f14 fB pb10 pl5">{:L(index_0056, array('usex'=>$usex))}</p>
      <ul>
      <php>if($space['followYou']){</php>
	      <volist id="vo" name="space['followYou']">
	        <li><span class="headpic50h"><a class="pic_box" href="{:U('space/View','uid='.$vo)}" target="_blank"><img src="{$vo|getUserFace='s'}" width="50" /></a></span>
	          <span class="OverHW lh18">
	          <a href="{:U('space/View','uid='.$vo)}" rel="{$vo}" class="preview" target="_blank">{$vo|getUsername}</a>
	          </span>
	        </li>
	      </volist>
	  <php>}else{</php>
	  		{:L(index_0063, array('usex'=>$usex))}
	  <php>}</php>
      </ul>
      <p class="C"></p>
      <p class="f12 pt10 pr5 alR"><a href="{:U('space/View/followyou',"uid=".$uid)}" target="_blank">{:L(index_0061)}...</a></p>
    </div>
    <div class="C"></div>  
    <div class="atten_deta">
      <p class="f14 fB pb10 pl5">{:L(index_0066)}</p>
      <ul>
      <php>if($space['visitors']){</php>
	      <volist id="vo" name="space['visitors']">
	        <li><span class="headpic50h"><a class="pic_box" href="{:U('space/View/','uid='.$vo['visitor'])}"><img src="{$vo.visitor|getUserFace='s'}" width="50"/></a></span>
	          <span class="OverHW lh18">
	          <a href="{:U('space/View/','uid='.$vo['visitor'])}" rel="{$vo['visitor']}" class="preview">{$vo.visitor|getUserName}</a>
	          </span>
	        </li>
	      </volist>
	  <php>}else{</php>
	  		<li>{:L(index_0067)}</li>
	  <php>}</php>
      </ul>
      <p class="C"></p>
      <p class="f12 pt10 pr5 alR"><a href="{:U('space/View/track',"uid=".$uid)}">{:L(index_0061)}...</a></p>
    </div>
  </div>
  <!-- --右边信息 begin-------->
  <div class="C"></div>
</div>
<include file="__THEME__/footer" />